package com.zy.explore.demo.infrastructure.config;

import java.util.concurrent.TimeUnit;

import feign.Retryer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

  /**
   * @author 刘小龙 xiaolong.liu@pingcl.com
   * @Date       ：Created in 2021/03/10
   * @Description：Feign配置类
   * @Modified By：
   * @Version: v1.0.0$
   */
@Configuration
public class FeignConfig {
	
	/**
	 * @method feignRetryer
	 * @description 设置feign超时及重试次数
	 * @params []
     * @author project auto generator
     * @date 2021/03/10
	 * @return feign.Retryer
	 **/
	@Bean
	public Retryer feignRetryer() {
		return new Retryer.Default(100, TimeUnit.SECONDS.toMillis(1), 5);
	}
	
}
